<template>
  <!-- -->
  <!-- <el-form ref="honorFormRef" :model="honorForm" :rules="honorFormRules" label-width="80px">
  </el-form>-->
  <!-- class="el-form--inline" -->
  <div>
    <el-form-item label="荣誉简述" prop="description">
      <el-input v-model="model.tags" type="textarea" placeholder="请输入内容" />
    </el-form-item>
    <el-form-item label="荣誉详情" prop="description">
      <div class="desc">
        <editor
          v-model="model.description"
          :min-height="192"
          :uploadUrl="uploadPictureUrl"
          v-on:onUploadSuccess="onUploadSuccess"
        >
          <!-- v-on:on-upload-success="onUploadSuccess" -->
        </editor>
      </div>
    </el-form-item>
  </div>
</template>
  
<script>
import Editor from '@/components/Editor';

export default {
  name: 'HonorDescription',
  components: { Editor },
  props: {
    model: Object,
    rules: Object

  },
  data () {
    return {
      pictureType: 1,
      // 上架标志字典
      publishedOptions: [],
      // 删除标志字典
      deletedOptions: []

    }
  },
  computed: {
    uploadPictureUrl () {
      return this.pictureType
        ? (process.env.VUE_APP_BASE_API + "/common/upload/" + this.pictureType)
        : (process.env.VUE_APP_BASE_API + "/common/upload")
    }
  },
  watch: {

  },
  methods: {
    handleEdit () {
      return;
    },
    onSubmit () {
      // console.log('submit!');
    },
    onUploadSuccess (res, file) {
      console.log('图片详情页面图片上传res:', res)
      console.log('图片详情页面file:', file)
    }
  },
  mounted () {
    // console.log('HonorDescription mounted')
  },
  created () {
    // console.log('HonorDescription created')
  },
  activated () {
    // console.log('HonorDescription activated')
  },
  deactivated () {
    // console.log('HonorDescription deactivated')
  },
  destroyed () {
    // console.log('HonorDescription destroyed')
  }
}
</script>
  
  <style scoped>
/* .el-form--inline .el-form-item .el-form-item__label{
    width: 80px;
  } */
.desc {
  vertical-align: bottom;
  margin-top: 36px;
}
/deep/ .ql-toolbar.ql-snow {
  border-top-left-radius: 0.3em;
  border-top-right-radius: 0.3em;
}
/deep/ .editor.ql-container.ql-snow {
  border-bottom-right-radius: 0.3em;
  border-bottom-left-radius: 0.3em;
}
</style>